package com.atguigu.spzx.manager.util;

import com.atguigu.spzx.manager.config.SpzxMinioConfig;
import io.minio.MinioClient;

public class MinioUtil {
    private MinioUtil(){}

    private static MinioClient minioClient;
    static {
        minioClient = MinioClient.builder()
                .endpoint(SpzxMinioConfig.URL) //地域节点：要连接的minio服务器地址
                .credentials(SpzxMinioConfig.ACCESS_KEY, SpzxMinioConfig.SECRET_KEY) //连接minio的账号密码
                .build();
    }
    public static MinioClient build(){
        return minioClient;
    }
}
